<template>
	<el-card shadow="hover" header="通知公告">
		<scTable ref="table" :apiObj="noticeList" row-key="id" stripe hideDo remoteSort remoteFilter>
			<el-table-column label="序号" type="index"></el-table-column>
			<el-table-column label="标题" prop="title" align="center" width="350"></el-table-column>
			<el-table-column label="通知时间" prop="createTime" align="center" width="200"></el-table-column>
			<el-table-column label="操作" fixed="right" align="center" min-width="70">
				<template #default="scope">
					<el-button-group>
						<el-button text type="primary" size="small" @click="tableShow(scope.row, scope.$index)">
							查看
						</el-button>
					</el-button-group>
				</template>
			</el-table-column>
		</scTable>
	</el-card>

	<save-dialog v-if="dialog.save" ref="saveDialog" @closed="dialog.save=false"></save-dialog>

</template>

<script>
import saveDialog from "@/views/system/notice/save.vue";

export default {
	components: {saveDialog},
	title: "通知公告",
	icon: "el-icon-monitor",
	description: "系统通知公告信息",
	data() {
		return {
			dialog: {
				save: false
			},
			noticeList: this.$API.system.notice.page
		}
	},
	mounted() {
	},
	methods: {
		// 查看
		tableShow(row) {
			this.dialog.save = true;
			this.$nextTick(() => {
				this.$refs.saveDialog.open('show').setData(row);
			})
		},
	}
}
</script>
